Kwatog Interactive Technical Notes to self… and maybe some more

10Oct/090

Pure-FTPD Installation

Install the pure-ftpd


[root]# cd /usr/local/src/
[root]# wget http://internap.dl.sourceforge.net/sourceforge/pureftpd/pure-ftpd-1.0.21.tar.gz
[root]# tar -xvzf pure-ftpd-1.0.21.tar.gz
[root]# cd pure-ftpd-1.0.21/

-Change --with-language to you language-

[root]#./configure --with-everything
[root]#make
[root]#make install-strip

-This start the pure-ftpd with 5 Users simultaneous and 2 simultaneous users for IP.


[root]#/usr/local/sbin/pure-ftpd -B -c 5 -C 2

-To test if the installation is ok:

[root]#ftp localhost


taken from RapidVPS Forum

Filed under: Linux No Comments
26Sep/090

MySQL Administration Commands

Backup MySQL Database into a File


-bash-3.2$mysqldump -ujhondoe -p mydb_name > mydb_name_backup.sql
password:
-bash-3.2$ zip mydb_name_backup.zip mydb_name_backup.sql

Load MySQL Backup Into Database


-bash-3.2$mysql -ujhondoe mydb_name < mydb_name_backup.sql
password:

Create User in MySQL


mysql> CREATE USER 'jhondoe'@'localhost' IDENTIFIED BY 'mypassword';
mysql> GRANT ALL PRIVILEGES ON mydbname.* TO 'jhondoe'@'localhost' WITH GRANT OPTION;

mysql> CREATE USER 'jhondoe'@'%' IDENTIFIED BY 'mypassword';
mysql> GRANT ALL PRIVILEGES ON mydbname.* TO 'monty'@'%' WITH GRANT OPTION;

9Sep/090

TAR : Archiving and Extracting Files and Folders

Here's the common syntax I use in archiving and extracting files or folders.

tar -xvf foo.tar

verbosely extract foo.tar


tar -xzf foo.tar.gz

extract gzipped foo.tar.gz


tar -cjf foo.tar.bz2 bar/

create bzipped tar archive of the directory bar called foo.tar.bz2


tar -xjf foo.tar.bz2 -C bar/

extract bzipped foo.tar.bz2 after changing directory to bar


tar -xzf foo.tar.gz blah.txt

extract the file blah.txt from foo.tar.gz

Filed under: Linux No Comments
5Sep/090

How to Find PHP.INI Path

If you can't find it in /etc/php.ini, then you have to use ssh and execute the command below.
php -i | grep php.ini

The command will return something like
Configuration File (php.ini) Path => /etc/php.ini

Filed under: Linux, PHP No Comments
18Aug/090

Change Ownership of File/Folder (chown)

chown kwatog /usr/kwatog