Archive for Posts Tagged ‘Linux’

12

Jul
2012
Comments Off on Installing MySQL on CentOS

Installing MySQL on CentOS

First thing you need to do is make sure the binaries are installed using yum. Note that this will only install MySQL and that you may need to run it as root depending on your systems permissions.
[korey@localhost ~]$ yum install mysql-server mysql
The next thing is start MySQL:
[korey@localhost ~]$ service mysqld start
Once you start the service, it will give you some instructions for having it start automatically on reboot, and how to secure it. Finally, secure MySQL, by setting a password for the root user and removing the anonymous user. Just make sure you use the same password for the first two statements below, otherwise you’ll end up scratching your head as to why you cannot login sometimes.
[korey@localhost ~]$ mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('****');
mysql> SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('****');
mysql> DROP USER ''@'localhost.localdomain';
mysql> DROP USER ''@'localhost';
read more

28

Oct
2010
Comments Off on Add new files to SVN from the command line

Add new files to SVN from the command line

Here is a little tip for automating files that need to be added to SVN. First make sure you are in your project folder that is under source control. Then try the following:
svn status | grep -e ^?
With this you’ll notive that it will list the files, but its not in a format ready automatable. So lets enhance it:
svn status | grep -e ^? | awk '{print $2}'
This time we get a list of the files that need to be added, but lets take it a step further and also add the files to SVN in one step:
svn add `svn status | grep -e ^? | awk '{print $2}'`
There. Now all you have to do is commit.
read more

30

Sep
2010
Comments Off on How to move your cvsroot folder

How to move your cvsroot folder

I recently came across a client who was running out of space on /var and needed to move some files off to a different location. There is history behind it, and this should not be your first option, but the short of it is that cvsroot was one of the folders that needed to be moved. Here is what I did to get them going again:
  1. Made sure all users where off of CVS.
  2. Moved the cvsroot from /var/lib/cvsroot to the new location (/newfolder/var/cvsroot)
  3. Added the CVSROOT env variable to /etc/profile. This way users running CVS from the command line do not have to specify the -d parameter:
  4. 1
    2
    
    CVSROOT='/newfolder/var/cvsroot'
    export CVSROOT
  5. Updated pserver configuration to reflect the new location. Now your file may not be located exactly where this was, but it should help you track it down:
  6. $ sudo vi /etc/xinetd.d/cvspserver
    Change –allow-root to reflect the new path
  7. Restart inetd
  8. $ sudo /etc/rc.d/init.d/xinetd restart
read more