Blog Details

Home Blogs

blog-img01

Server Admin

Server Admin

Virtualmin Control Panel Setup in CentOS 6
SL No Description
1 cat /proc/version
2
yum install wget
3
wget http://software.virtualmin.com/gpl/scripts/install.sh
4
sh ./install.sh
5 yum provides */scp
6 yum -y install openssh-clients
Directory Size
SL No Description
1
du -ch | grep total
Cron Job in CentOS 6
SL No Description
1 crontab -l [to see the existing schedule list]
2 crontab -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 No Description
1 yum remove mongo-10gen mongo-10gen-server [removing previous mongoDB]
2 yum install gcc [install C compiler]
3 yum -y install gcc automake autoconf libtool make [install libtool make]
4 yum install php-devel [install package for phpize command]
5 pecl 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
8 vi /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 No Description
1 Downloads for win32 – MongoDB
2 Extract the archive to the directory as c:\mongodb
3 Create a file as mongodb.config to the directory c:\mongodb\bin [ie, c:\mongodb\bin\mongodb.config]
4 make sure you have data folder as c:\mongodb\data
5 Write a path in mongodb.config file as

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

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

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

: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 No Description
1 [root@u15972483 ~]#
2 yum repolist

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

[(14,441)]
7 yum update
Re-Boot the Plesk Server
SL No Description
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 No Description
1 login as: root
2 root@74.208.79.80
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3 Last login: Sat July 29 01:19:39 2012 from 203.83.172.78
4 [root@u15972483 ~]#
5 vi /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
7 ZZ (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 No Description
1 login as: root
2 root@74.208.79.80
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3 Last login: Sat Apr 28 01:19:39 2012 from 203.83.172.78
4 [root@u15972483 ~]#
5 yum -y install php-pecl-apc
6 vi /etc/php.d/apc.ini [Note: http://www.server-world.info/en/note?os=CentOS_6&p=httpd&f=8]
7 I (insert text at beginning of current line, until
hit) [Note: http://www.cs.colostate.edu/helpdocs/vi.html]
8 I (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
14 cp /usr/share/doc/php-pecl-apc-*/apc.php /var/www/vhosts/softworksbd.com/httpdocs/apc
Install APC in Windows[Xampp/Wampp Server]
SL No Description
1 Download APC dll file [Considering you are using or PHP 5.3.1]
2 Extract the zip file & place php_apc.dll to the server derectory as “/xampp/php/ext”
3 configure the php.ini

extension=php_apc.dll
4 Finally restart the apache
Configure Memcached Server?
SL No Description
1 login as: root
2 root@74.208.79.80
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3 Last login: Sat Apr 28 01:19:39 2012 from 203.83.172.78
4 [root@u15972483 ~]#
5 vi /etc/sysconfig/memcached
Install memcached in Centos 6
SL No Description
1 login as: root
2 root@74.208.44.241
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3 yum 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 No Description
1 Download Memcache dll file [Considering you are using PHP 5.3.1]
2 Extract the zip file & place php_memcache.dll to the server derectory as “/xampp/php/ext”
3 configure the php.ini

extension=php_memcache.dll
4 Finally restart the apache

Dumping & Restoring Database into Server
SL No Description
1 login as: root
2 root@74.208.44.241
This email address is being protected from spambots. You need JavaScript enabled to view it.
‘s password:
3 Last 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 No Description
1 # scp /var/www/vhosts/softworksbd.com/httpdocs/rockmongo.zip
root@74.208.44.241
This email address is being protected from spambots. You need JavaScript enabled to view it.
:/var/www/vhosts/mohfwscmp.org/httpdocs/
2 root@74.208.44.241
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 No Description
1 Make sure you have installed com_akeeba-3.3.8-core.zip components into your local joomla site[using Extension Manager]
2 After installed, set akeeba configuration as follows, destination the backup files, backup file format as zip
3 Start 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)
4 After backup completion, you may find your zip file into the following directory :/local joomla administrator/components/com_akeeba/backup/yourbackup.zip
5 Make sure you have pscp.exe (example: C:\Program Files\ExtraPutty 0.22\Bin\pscp.exe)
6 Start=>Run=>cmd=>enter=>cd C:\Program Files\ExtraPutty 0.22\Bin(Enter)
7 pscp.exe(Enter)
8 Assume that my akeba backup file located as E:\yourbackup.zip because I changed my current location of my backup zip file
9 pscp E:\yourbackup.zip
root@74.208.79.80
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]
10 Now, go to plesk panel as httpdocs/szlmis, choose yourbackup.zip and Extract file
11 Make sure you have putty.exe open the server as SSH mode using User: root password: initial password
12 Now, 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
16 Then http://softworksbd.com/szlmis from your browser then enter
17 Setup the installation
18 Done
Partition CentOS 6 Server
SL No Description
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 No Description
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 *