trialbybyte
trialbybyte
Trial By Byte
29 posts
Tech ramblings and other nonsense
Don't wanna be here? Send us removal request.
trialbybyte · 10 years ago
Link
Because you cannot create partition larger than 2TB with fdisk utility, you need to use GNU parted with GPT ( Suppose you have a logical volume  /dev/sdb which size is 7TB. Here is the procedure on...
0 notes
trialbybyte · 10 years ago
Text
Secure /tmp
rm -rf /tmp mkdir /tmp mount -t tmpfs -o rw,noexec,nosuid tmpfs /tmp chmod 1777 /tmp echo "tmpfs /tmp tmpfs rw,noexec,nosuid 0 0" >> /etc/fstab rm -rf /var/tmp ln -s /tmp /var/tmp
0 notes
trialbybyte · 10 years ago
Text
Basic Setup
yum -y upgrade rpm -ivh http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/epel-release-6-5.noarch.rpm rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-13.ius.el6.noarch.rpm yum -y install gcc gcc-c++ automake autoconf autoconf213 libtool make libXext-devel unzip distcache slocate patch sysstat gcc44 gcc44-c++ zlib zlib-devel openssh* openssl* gd gd-devel pcre pcre-devel pcre.x86_64 pcre-devel.x86_64 flex bison file libgcj gettext gettext-devel e2fsprogs-devel libtool-libs libtool-ltdl-devel kernel-devel libidn libidn-devel krb5-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel libXpm-devel libmcrypt libmcrypt-devel glib2 glib2-devel bzip2 bzip2-devel vim-minimal nano sendmail ncurses ncurses-devel curl curl-devel e2fsprogs gmp-devel pspell-devel aspell-devel numactl lsof pkgconfig gdbm-devel tk-devel bluez-libs-devel iptables* rrdtool diffutils libc-client libc-client-devel zip2-devel sqlite-devel readline-devel tk-devel db4-devel libpcap-devel xz-devel yum-priorities wget bind-utils yum -y groupinstall 'development tools' shutdown -r now
0 notes
trialbybyte · 13 years ago
Link
1 note · View note
trialbybyte · 13 years ago
Text
Synology DS413 Bootstrap
Add the following repository to the Package Center and install the Bootstrap Installer from it:
http://packages.quadrat4.de/
Once it's done reboot the DS413 and you should be able to use ipkg now:
$ipkg update
$ipkg install bash
2 notes · View notes
trialbybyte · 13 years ago
Text
Lion and FileMerge
Ran into another issue because of my recent upgrade to Lion. I use Coda for dev work and have grown used to the built-in source control. One of the features in Coda is a compare files function which uses the FileMerge.app to display the differences.
Knowing that FileMerge is part of the developer tools I proceeded to download the Xcode application from the Mac App Store. To my dismay FileMerge still did not want to compare the files.
After some digging I found Coda uses the `opendiff` command to launch FileMerge. Running the command manually brings up the following error message:
xcode-select: Error: No Xcode folder is set. Run xcode-select -switch <xcode_folder_path> to set the path to the Xcode folder.
So it seems like `opendiff` doesn't know where your Xcode.app is by default. To fix it, run the following command:
sudo xcode-select -switch /Applications/Xcode.app
The compare files feature in Coda now works as expected.
2 notes · View notes
trialbybyte · 13 years ago
Text
Lion Terminal.app and the Meta key
When setting up a new OS X install, one of the settings I always set in the Terminal.app is the `Use option as meta key` option. This allows you to use the Option key instead of Esc as the meta modifier.
One of my Terminal uses is running IRSSI inside a screen session. To switch between windows in irssi I always use `option + left/right arrow` however in Lion this does not seem to work by default.
After some googling I didn't find anything that offered a solution so I dug through the Terminal.app preferences and noticed some additional presets in the Keyboard tab that aren't there is previous versions of OS X.
To fix it, in Terminal.app go to
Preferences -> Settings -> Keyboard
Locate the two settings
`option cursor left` and `option cursor right`
as named in the Key column and delete them by selecting one and click the - (Minus) button at the bottom of the window.
4 notes · View notes
trialbybyte · 14 years ago
Text
Install Sphinx on CentOS
Download the latest beta release from the Downloads page.
wget http://sphinxsearch.com/files/sphinx-2.0.2-1.el5.x86_64.rpm
Install from the RPM (if updating use 'rpm -Uvh' instead):
rpm -ivh sphinx-2.0.2-1.el5.x86_64.rpm
Enable auto-lauching of the search daemon on boot:
chkconfig --level 345 searchd on
Start the search daemon:
/etc/init.d/searchd start
6 notes · View notes
trialbybyte · 14 years ago
Link
0 notes
trialbybyte · 14 years ago
Text
Switch to php-mysqlnd
Background on the issue available here and here. In the end the fix is to use mysqlnd:
yum --enablerepo=remi remove php-mysql yum --enablerepo=remi install php-mysqlnd phpMyAdmin yum --enablerepo=remi install Percona-Server-shared-compat perl-DBD-MySQL
0 notes
trialbybyte · 14 years ago
Text
Workaround for installing phpMyAdmin on CentOS
Having mysql/php/apache already setup I decided to install phpMyAdmin, however because the mysql is Percona there were some dependency checks that failed.
After a lot of trial and error the following did the trick:
#stop the services /etc/init.d/httpd stop /etc/init.d/mysql stop #remove mysql yum --enablerepo=remi remove Percona* mysql* #install everything in one shot yum --enablerepo=remi install Percona-Server-server-55 Percona-Server-client-55 phpMyAdmin #start the services /etc/init.d/httpd start /etc/init.d/mysql start #rerun the secure installation script /usr/bin/mysql_secure_installation
Once that has finished you'll need to edit the apache config to allow you remote access to the phpMyAdmin site:
nano /etc/httpd/conf.d/phpMyAdmin.conf #add allow from your ip address allow from 123.456.789.101
You should now be able to access it at http://example.com/phpMyAdmin/
51 notes · View notes
trialbybyte · 14 years ago
Text
Change I/O Scheduler on CentOS
To change the default scheduler from cfq to deadline simply edit /etc/grub.conf and add elevator=deadline to the kernel that is being used:
$ nano -w /etc/grub.conf title CentOS (2.6.18-274.3.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-274.3.1.el5 ro root=LABEL=/ elevator=deadline initrd /initrd-2.6.18-274.3.1.el5.img
This entry tells the 2.6.18-274.3.1.el5 kernel to use the Deadline scheduler. Make sure to reboot the system to activate the new scheduler.
2 notes · View notes
trialbybyte · 14 years ago
Link
17 notes · View notes
trialbybyte · 14 years ago
Text
Find which packages are installed by which repo
A handy tip I saw on IRC today. If you've ever wanted to see which packages were installed from where then the 'keychecker' program is for you.
Make sure you have the EPEL repository setup first, then install via yum:
yum install keychecker
Once installed simply run the 'keychecker' command and it will output all your installed packages sorted by reposity.
38 notes · View notes
trialbybyte · 14 years ago
Text
Add syntax highlighting to Tumblr
After posting a bunch of code it dawned on me that it should look a bit nicer than it does by default using <pre> tags.
So after a bit of googling this is the solution I came with. It uses portions of http://snippets-of-code.tumblr.com/post/6027484416/adding-syntax-highlighting-into-tumblr and http://tomayko.com/writings/javascript-prettification.
<!-- For Syntax Highlighting --> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <link rel="stylesheet" type="text/css" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css"></link> <script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script> <script type="text/javascript"> <!-- $(document).ready(function() { // add prettyprint class to all <pre><code></code></pre> blocks var prettify = false; $("pre code").parent().each(function() { $(this).addClass('prettyprint'); prettify = true; }); // if code blocks were found, bring in the prettifier ... if ( prettify ) { prettyPrint(); } }); --> </script>
When posting code, use a text editor to change all the angle brackets to < and > and enclose it in <pre><code></code></pre> tags. The <pre></pre> is necessary to keep the formatting.
7 notes · View notes
trialbybyte · 14 years ago
Text
Install mediainfo on CentOS
MediaInfo supplies technical and tag information about a video or audio file.
First lets grab the rpms. From the download page download the rpms that are appropriate for your platform. My system is CentOS 5 x_64 in the following example:
mkdir /usr/local/src/mediainfo cd /usr/local/src/mediainfo #libzen0 wget http://downloads.sourceforge.net/zenlib/libzen0-0.4.22-1.x86_64.CentOS_5.rpm #libmediainfo0 wget http://downloads.sourceforge.net/mediainfo/libmediainfo0-0.7.50-1.x86_64.CentOS_5.rpm #CLI wget http://downloads.sourceforge.net/mediainfo/mediainfo-0.7.50-1.x86_64.CentOS_5.rpm
Once downloaded, install them via the following commands:
rpm -i libzen0-0.4.22-1.x86_64.CentOS_5.rpm rpm -i libmediainfo0-0.7.50-1.x86_64.CentOS_5.rpm rpm -i mediainfo-0.7.50-1.x86_64.CentOS_5.rpm
That's it! You can test it by running the 'mediainfo' command.
0 notes
trialbybyte · 14 years ago
Text
Helpful links for adding a second hard drive to CentOS
Using the following resources helped setup my second hard drive:
http://www.myliteraturetechlife.com/how-to-mount-second-hard-drive-in-centos-5-x/
http://serverfault.com/questions/219949/partition-and-mount-my-secondary-hard-drive-on-centos-5-5-64bit
http://blog.jiwen.info/?p=115
http://www.techotopia.com/index.php/Adding_a_New_Disk_Drive_to_an_RHEL_6_System
8 notes · View notes