Blog Details

Home Blogs

blog-img01

Server Admin

Server Admin

Virtualmin Control Panel Setup in CentOS 6
SL NoDescription
1cat /proc/version
2
yum install wget
3
wget http://software.virtualmin.com/gpl/scripts/install.sh
4
sh ./install.sh
5yum provides */scp
6yum -y install openssh-clients
Directory Size
SL NoDescription
1
du -ch | grep total
Cron Job in CentOS 6
SL NoDescription
1crontab -l [to see the existing schedule list]
2crontab -e [to edit with the existing schedule list]
3
*/5  *  *  *  *  /usr/bin/php -q /var/www/vhosts/icatalogbd.com/httpdocs/iCatalog/cron/isNewController.php
4
*/5  *  *  *  *  [Minute  Hour  Day of Month  Month  Day of Week]
5
*/5  *  *  *  *  /usr/bin/php -q /var/www/vhosts/icatalogbd.com/httpdocs/iCatalog/cron/isNewController.php > /dev/null 2>&1

[Remove email notification to the admin]

6/etc/init.d/crond status
7/etc/init.d/crond stop
8/etc/init.d/crond start
Install MongoDB in CentOS 6 Using pecl
SL NoDescription
1yum remove mongo-10gen mongo-10gen-server [removing previous mongoDB]
2yum install gcc [install C compiler]
3yum -y install gcc automake autoconf libtool make [install libtool make]
4yum install php-devel [install package for phpize command]
5pecl version [check pecl version]
6
PEAR Version: 1.9.4PHP Version: 5.3.3Zend Engine Version: 2.3.0Running on: Linux u15972483.onlinehome-server.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64
7
pecl install mongo
8vi /etc/php.ini
9
extension=mongo.so
10
/etc/init.d/httpd status [Note: Check apache status]
11
/etc/init.d/httpd stop [Note: stop apache]
12
/etc/init.d/httpd start [Note: start apache]
Install MongoDB in Windows[Xampp/Wampp Server]
SL NoDescription
1Downloads for win32 – MongoDB
2Extract the archive to the directory as c:\mongodb
3Create a file as mongodb.config to the directory c:\mongodb\bin [ie, c:\mongodb\bin\mongodb.config]
4make sure you have data folder as c:\mongodb\data
5Write a path in mongodb.config file as

dbpath=c:\mongodb\data
6now write in your command promt(Start->Run->cmd) as

cd c:\mongodb\bin
mongod --config c:\mongodb\bin\mongodb.config
7MongoDB is now connected. now you have to install php driver as follows
8Download MongoDB dll file [Considering you are using PHP 5.2.9 or PHP 5.3.1]
9Extract the zip file & place php_mongo.dll to the server derectory as “/xampp/php/ext”
10configure the php.ini

extension=php_mongo.dll
11Finally restart the apache
Install CouchDB in CentOS 6
SL NoDescription
1[root@u15972483 ~]#
2yum info couchdb
3yum install couchdb
4/etc/init.d/couchdb status
5/etc/init.d/couchdb start
6vi /etc/couchdb/local.ini
7bind_address=your.ip.address
8ZZ

:q for close without saving & ZZ for close with saving
9/etc/init.d/couchdb stop
10/etc/init.d/couchdb start
11/etc/init.d/couchdb status
Install EPEL Repo in CentOS 6
SL NoDescription
1[root@u15972483 ~]#
2yum repolist

[(6,740)]
3cd /tmp
4wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
5rpm -ivh epel-release-6-7.noarch.rpm
6yum repolist

[(14,441)]
7yum update
Re-Boot the Plesk Server
SL NoDescription
1/etc/init.d/psa status
2/etc/init.d/psa stop (Removing 500 Internal server error)
3/etc/init.d/psa start
4/etc/init.d/psa status
Install MongoDB in CentOS 6 Using yum
SL NoDescription
1login as: root
2 [email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3Last login: Sat July 29 01:19:39 2012 from 203.83.172.78
4[root@u15972483 ~]#
5vi /etc/yum.repos.d/10gen.repo
6
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
7ZZ (exit vi , saving changes)
8
yum update
9
yum install mongo-10gen mongo-10gen-server
10
/etc/init.d/mongod status
11
/etc/init.d/mongod start
12
/etc/init.d/mongod status
Install APC in CentOS 6
SL NoDescription
1login as: root
2 [email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3Last login: Sat Apr 28 01:19:39 2012 from 203.83.172.78
4[root@u15972483 ~]#
5yum -y install php-pecl-apc
6vi /etc/php.d/apc.ini [Note: http://www.server-world.info/en/note?os=CentOS_6&p=httpd&f=8]
7I (insert text at beginning of current line, until
hit) [Note: http://www.cs.colostate.edu/helpdocs/vi.html]
8I (insert text at beginning of current line, until
hit) [Note: http://www.cs.colostate.edu/helpdocs/vi.html]
9:wq

(quit vi, writing out modified file to file named in original invocation)
10/etc/init.d/httpd status [Note: Check apache status]
11/etc/init.d/httpd restart [Note: restart apache]
12/etc/init.d/httpd status [Note: Check apache status]
13[root@www ~]# mkdir /var/www/html/apc
14cp /usr/share/doc/php-pecl-apc-*/apc.php /var/www/vhosts/softworksbd.com/httpdocs/apc
Install APC in Windows[Xampp/Wampp Server]
SL NoDescription
1Download APC dll file [Considering you are using or PHP 5.3.1]
2Extract the zip file & place php_apc.dll to the server derectory as “/xampp/php/ext”
3configure the php.ini

extension=php_apc.dll
4Finally restart the apache
Configure Memcached Server?
SL NoDescription
1login as: root
2 [email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3Last login: Sat Apr 28 01:19:39 2012 from 203.83.172.78
4[root@u15972483 ~]#
5vi /etc/sysconfig/memcached
Install memcached in Centos 6
SL NoDescription
1login as: root
2 [email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3yum install memcached.x86_64 php-pecl-memcache.x86_64
4# vi /etc/sysconfig/memcached
5# /etc/init.d/memcached start
6# /etc/init.d/memcached stop
7# /etc/init.d/memcached restart
8# /etc/init.d/memcached status
Install Memcache in Windows[Xampp/Wampp Server]
SL NoDescription
1Download Memcache dll file [Considering you are using PHP 5.3.1]
2Extract the zip file & place php_memcache.dll to the server derectory as “/xampp/php/ext”
3configure the php.ini

extension=php_memcache.dll
4Finally restart the apache

Dumping & Restoring Database into Server
SL NoDescription
1login as: root
2 [email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3Last login: Fri Feb 10 03:35:37 2012 from 103.10.78.153
4[root@u15980126 ~]# mysqldump -u lmisdemo -pmlcgjnwc9a sciplmisdb > /var/www/vhosts/scipdemo.com/httpdocs/sciplmisdb.sql
5[root@u15980126 ~]# mysql -u lmisdemo -pmlcgjnwc9a sciplmisdb < /var/www/vhosts/scipdemo.com/httpdocs/sciplmisdb.sql
Copy zip file Centos 6 server to other Linux server
SL NoDescription
1# scp /var/www/vhosts/softworksbd.com/httpdocs/rockmongo.zip
[email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
:/var/www/vhosts/mohfwscmp.org/httpdocs/
2 [email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3
rockmongo.zip                                 100%  389KB 389.0KB/s   00:00

Local Joomla Site Upload to Server
SL NoDescription
1Make sure you have installed com_akeeba-3.3.8-core.zip components into your local joomla site[using Extension Manager]
2After installed, set akeeba configuration as follows, destination the backup files, backup file format as zip
3Start Backup now. [Akeeba will backup your full local site+joomla database] (note: if you have some other database, you have to import into server differently)
4After backup completion, you may find your zip file into the following directory :/local joomla administrator/components/com_akeeba/backup/yourbackup.zip
5Make sure you have pscp.exe (example: C:\Program Files\ExtraPutty 0.22\Bin\pscp.exe)
6Start=>Run=>cmd=>enter=>cd C:\Program Files\ExtraPutty 0.22\Bin(Enter)
7pscp.exe(Enter)
8Assume that my akeba backup file located as E:\yourbackup.zip because I changed my current location of my backup zip file
9pscp E:\yourbackup.zip
[email protected]
This email address is being protected from spambots. You need JavaScript enabled to view it.
:/var/www/vhosts/softworksbd.com/httpdocs/szlmis [Assume for softworksbd.com]
10Now, go to plesk panel as httpdocs/szlmis, choose yourbackup.zip and Extract file
11Make sure you have putty.exe open the server as SSH mode using User: root password: initial password
12Now, you have to set some chmod for your server site,
13[root@u15972483 ~]# cd /var/www/vhosts/softworksbd.com/httpdocs/ szlmis
14[root@u15972483 szlmis]# chmod 0777 configuration.php
15[root@u15972483 szlmis]# chmod 0777 installation
16Then http://softworksbd.com/szlmis from your browser then enter
17Setup the installation
18Done
Partition CentOS 6 Server
SL NoDescription
1
df -h

[to check the partition and logical volume sizes of the mounted space ]

2
fdisk -l

[to check the logical space of the total partitions]

3
pvs

[to check the actual physical space remaining]

4
lvextend -L +50G /dev/mapper/vg00-var

[to extend the partition for var]

5
mount
6
resize2fs /dev/mapper/vg00-var

[resize the partition]

7
df -h
Some Important command for CentOS 6 Server
SL NoDescription
1
unzip demo.zip

[unzip any file into current directory]

2
mv * ../

[move all files to previous directory]

3
scp root@sourcehost:/var/www/vhosts/demo1.com/demo.zip /var/www/vhosts/demo2.org/httpdocs

[move all files to previous directory]

© 2012-13 Md. Khurshed Alam Nayeem

Leave a Reply

Your email address will not be published. Required fields are marked *