IT/Linux Notes

PHP
php -i | grep -i date

date.timezone = “Europe/London”

service httpd restart

ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

/etc/init.d/httpd restart

MySQL
mysql -uuser -ppass <filename.sql

$wgDBtype          = "mysql"; $wgDBserver        = "localhost"; $wgDBname          = "$_DB"; $wgDBuser          = "$_USER"; $wgDBpassword      = "$_PASS";


 * 1) mysqladmin -u root -p create $_DB


 * 1) mysql -u root -p $_DB


 * 1) CREATE USER '$_USER'@'localhost' IDENTIFIED BY '$_PASS';

GRANT ALL PRIVILEGES ON $_DB.* TO '$_USER'@'localhost' WITH GRANT OPTION;

GRANT ALL ON $_DB.* to '$_USER'@'localhost' identified by '$_PASS';

CREATE USER '$_USER'@'localhost' IDENTIFIED BY '$_PASS'; GRANT ALL PRIVILEGES ON $_DB.* TO '$_USER'@'localhost'WITH GRANT OPTION;

create database $_DB;
 * 1) grant usage on *.* to $_USER@localhost identified by ‘$_PASS’;

CREATE USER '$_USER'@'localhost' IDENTIFIED BY '$_PASS';

GRANT ALL PRIVILEGES ON $_DB.* to '$_USER'@'localhost' ;

SET PASSWORD FOR '$_USER'@'localhost' = PASSWORD('$_PASS');

FLUSH PRIVILEGES ;

exit

others
cacti owncloud owncloud-3rdparty
 * 1) removed

yum groupinstall "Web Server" "MySQL Database"

yum install php php-pdo php-cli php-gd php-pear php-common php-xml php-mysql mysql mysql-server