Archive

Archive for the ‘CentOS’ Category

How to install WordPress on CentOS

February 1, 2012 5 comments

1. Make sure LAMP is ready

2. Download wordpress latest version

# cd ~/tmp

# wget http://wordpress.org/latest.zip

Current version is 3.3.1.

3. Extract the zip file and move to host folder

# unzip latest.zip

# mv wordpress /var/www/html/wp

# chown -R apache:apache /var/www/html/wp             ————— change the owner as “apache”

4. Create a database for wordpress

mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'my-password';
mysql> FLUSH PRIVILEGES;


4. Set up configure file

# cd /var/www/html/wp
# cp wp-config-sample.php wp-config.php
# vi wp-config.php


Replace following as yours:
database_name_here --> database name, such as "wordpress"
username_here -------> database user name, for instance "wp1"
password_here -------> database password, eg. "mypassword"

5. Start installation from web

http://192.168.1.1/wp/wp-admin/install.php

And then, follow the page to setup site information.

Categories: CentOS, Wordpress

yum install gnome for CentOS

January 28, 2012 Leave a comment

Minimum installation of CentOS server would not include any x-windows, but you could install gnome.

1. Verify group components installed

# yum grouplist

2. Install x-window

# yum groupinstall “X Window System”

3. Install Gnome

# yum groupinstall “GNOME Desktop Environment”

 

4. Remove Gnome

# yum groupremove “GNOME Desktop Environment”

 

5. Start Gnome

# startx
Categories: CentOS

libmcrypt.so.4()(64bit) is missing

January 5, 2012 Leave a comment

Issue:

# yum install php-mcrypt

reported: libmcrypt.so.4()(64bit) is missing

Solution:

1. Install rpmforge repository

2. # yum –enablerepo=rmpforge install libmcrypt libmcrypt-devel

3. # yum –enablerepo=remi install php-mvrypt

4. # yum –enablerepo=remi install phpmyadmin

 

Categories: LAMP, yum

yum install phpMyAdmin

January 5, 2012 Leave a comment

# yum –enablerepo=remi update

–> This will update php and mysql

 

#yum –enablerepo=remi install phpmyadmin

Categories: LAMP

LAMP installation

January 4, 2012 Leave a comment

1. Install LAMP

After installed OS, then:

# yum install httpd php php-mysql mysql-server

2. Set the httpd start up

# chkconfig –add httpd

# service httpd start

# chkconfig --levels 235 httpd on

3. Change MySql password for root

# mysqladmin -u root password new-password

4. Set mysql start up

# chkconfig –add mysqld

# service mysqld start

# chkconfig --levels 235 mysqld on

5. Test httpd with php

Add following content to /var/www/html/test.php file.

<?php   phpinfo();   ?>

6. Install phpMyAdmin

# yum –enablerepo=remi install phpmyadmin

7. Test MySql

# mysql -u root -p
mysql> drop database test;
mysql> use mysql;
mysql> delete from db;
mysql> delete from user where not (host=”localhost” and user=”root”);
mysql> flush privileges;

Categories: LAMP

CentOS install gcc/c/c++

December 25, 2011 Leave a comment

Under CentOS 6

1. Install with internet connection

# yum groupinstall 'Development Tools'

2. Install with local DVD

# yum --enablerepo=c6-media groupinstall Development Tools'

3. Kernel heads should be installed sometimes

# yum install kernel-devel*

Categories: cc

Install MySQL under CentOS via yum

October 2, 2011 Leave a comment

1. Install MySQL

#yum install mysql mysql-devel mysql-server

2. Set MySQL as a service and auto run with system

# chkconfig –add mysqld
# chkconfig –level 3 mysqld on

3. Set password for root — for first time only

# service mysqld start

# mysqladmin -u root password ‘new-password’

4. Test MySQL running

# mysql -u root -p

mysql> show databases;
+——————–+
         | Database           |
        +——————–+
         | information_schema |
         | mysql              |
         | test               |
        +——————–+
        3 rows in set (0.00 sec)

mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)

Categories: CentOS, MySQL

yum update excluding *386 packages

October 1, 2011 Leave a comment

Update CentOS 64 bits only, no any 386 packages.

 

1. Edit yum configuration file

# vi /etc/yum.conf

2, Append below line at the bottom:

  exclude=*.i386 *.i586 *.i686

3. Start update system

#yum update

Categories: CentOS, yum