Thursday, September 22, 2011

user adding for ssh

useradd -d /var/www/xyz.com.tr/musteri  -s /bin/bash -g sshd musteri

Installing PHP5 on fedora


--ref:  http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-fedora-12-lamp-p2
---
We can install PHP5 and the Apache PHP5 module as follows:

yum install php

We must restart Apache afterwards:

/etc/init.d/httpd restart

--Testing PHP5 / Getting Details About Your PHP5 Installation

The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.

vi /var/www/html/info.php

<?php
phpinfo();
?>


Now we call that file in a browser (e.g. http://192.168.0.100/info.php):

Installing Apache2 on linux


--ref:  http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-fedora-12-lamp-p2
---
 yum install httpd
--Now, start the Apache/httpd
 chkconfig httpd on
 /etc/init.d/httpd start

Enable root login in GUI on Fedora 12



Login as Normal User.
#Open the terminal and use vim or gedit to open the /etc/pam.d/gdm
$:  su
Password: enter password
#:  nano /etc/pam.d/gdm

Comment the following line  'auth required pam_succeed_if.so user !=root quiet'

# auth required pam_succeed_if.so user != root quiet

Do the same for "/etc/pam.d/gdm-password"

Save the file and logout from GUI. Now you can login as root

install PhpMyAdmin on Linux (CentOS/fedora)


--Login as a root user or

# su
--Move to your web directory

# cd /var/www/html
--Download the desired PhpMyAdmin package


--Choose either of the command depending on the version you server support. phpMyAdmin-2.11.3 is compatible with PHP 4+ and MySQL 3+ and phpMyAdmin-3.2.4 compatible with PHP 5 and MySQL 5.

# wget -c http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.4.5/phpMyAdmin-3.4.5-english.tar.gz/download
--Unzip and extract the files
# tar xvfz phpMyAdmin-3.4.5-english.tar.gz
--Rename the extrcted folder to phpmyadmin
# mv phpMyAdmin-3.4.5-english phpmyadm
--Move to the new folder
# cd phpmyadmin

--copy the smaple config and make a new conig file
# cp config.sample.inc.php config.inc.php
--Edit the config.inc.php file

# nano config.inc.php

--Go to the flilowing line and change to ‘http’

………
$cfg['Servers'][$i]['auth_type'] = ‘http’; # default is cookies

……..
To save the edited file press “Ctrl+o” and press “Enter” key

To exit file press “Ctrl+x”
Restart the webserver
# /sbin/service httpd restart

CentOS/Fedora core Linux PHP installation


--
http://www.webtatic.com/packages/php53/

If you would like to install PHP use yum command
# yum install php
or
#yum --enablerepo=webtatic install php

--To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:'

yum search php
--Pick the ones you need and install them like this:
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy

--Now restart Apache2:

---If you would like to upgrade PHP use yum command
# rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Installing MySQL 5 on linux fedora/centos



---
---To install MySQL, we do this:

#yum install mysql mysql-server

--Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

#chkconfig --levels 235 mysqld on
#/etc/init.d/mysqld start

--Run  to set a password for the user root (otherwise anybody can access your MySQL database!).

#mysqladmin -u root password yourrootsqlpassword
#mysqladmin -h server1.example.com -u root password yourrootsqlpassword

--restart apache
on centos

#/sbin/service httpd restart

On fedora
#/etc/init.d/httpd restart