Thursday, 25 June 2015

PHP , MSQL,PEARL,CPAN and its related dependencies

We have already covered first two points in the previous. so i will start from the  installation of PHP , MSQL,PEARL,CPAN and its related dependencies.

Now after login with the root you should run the command

Process 1.

"yum install rdate unzip make patch gcc gcc-c++ subversion php php-devel php-gd gd-devel php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel httpd libpcap libpcap-devel libnet ncurses ncurses-devel screen mysql-server mysql-devel ntp kernel* mutt glibc.i686 conntrack-tools telnet"

it will install all the packages which we have mentioned above automatically.

its not dependent on the Centos 32 bit or 64 bit.


Process.2 

Every application uses some database to hold its data, here you will be using MYSQL, so we need to apply the mysql password and will create the database.

So follow the command

first command
"/etc/init.d/mysqld start " and press "Enter"

Now it will start the installation and configuration simultaneously.

Second Command

"/usr/bin/mysqladmin -u root password 'MYSQL_PASSWORD'"

Please replace the "MYSQL_PASSWORD" with the password you want to have with the database.

Third Command

"mysql_secure_installation"

Now it will install all the mysql, but remember the password which it has asked you to put in the command .

it will ask you and just confirm password and then press only enter and enter until it will be finished.


Forth Command

"chkconfig mysqld on"

Its essential to check the services of the mysql because if its not working then dialer will not do any activity.

this command always check the services and send notification if its not working.

Remember one thing

as you have done the MYSQL installation, so we need to copy the original file of mysql configuration which can be needed in future.

Steps are as follows

Stoping the mysql services

A) "service mysqld stop"

Copying the file and renaming it with my.cnf.original

B) "cp /etc/my.cnf /etc/my.cnf.original"

Checking for errors

C) "echo "" > /etc/my.cnf"

Now there will be no file exist my.cnf , so we will create and paste the require configuration needed.

I will use nano its simple and quick.

D) "nano /etc/my.cnf"

and now copy all this and just right click in your file.

from this blue to end blue ( hahahah its funny but easy) 
service mysqld stop
cp /etc/my.cnf /etc/my.cnf.original
echo "" > /etc/my.cnf
[mysql.server]
user = mysql
#basedir = /var/lib

[client]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
datadir = /var/lib/mysql
#tmpdir = /home/mysql_tmp
socket = /var/lib/mysql/mysql.sock
user = mysql
old_passwords = 0
ft_min_word_len = 3
max_connections = 800
max_allowed_packet = 32M
skip-external-locking

log-error = /var/log/mysqld/mysqld.log

query-cache-type = 1
query-cache-size = 32M

long_query_time = 1
#slow_query_log = 1
#slow_query_log_file = /var/log/mysqld/slow-queries.log

tmp_table_size = 128M
table_cache = 1024

join_buffer_size = 1M
key_buffer = 512M
sort_buffer_size = 6M
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M

max_tmp_tables = 64

thread_cache_size = 8
thread_concurrency = 8

# If using replication, uncomment log-bin below
#log-bin = mysql-bin

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
#log-error = /var/log/mysqld/mysqld.log
#pid-file = /var/run/mysqld/mysqld.pid

Now do CTRL-X and press Enter.

your configuration has been saved.













1 comment:

  1. Hey please help me out...I did execute the following first command..

    yum install rdate unzip make patch gcc gcc-c++ subversion php php-devel php-gd gd-devel php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel httpd libpcap libpcap-devel libnet ncurses ncurses-devel screen mysql-server mysql-devel ntp kernel* mutt glibc.i686 conntrack-tools telnet

    .....all the packages except the following did install..but for these packages the error is shown...
    No package mysql-server available
    No package php-mcrypt available
    No package php-imap available

    ReplyDelete