1. Configure error page
- look for /etc/httpd/conf/httpd.conf
- search for ErrorDocument
- uncomment/add the line for 404 and 403
- type in http://xxx.xxx.com for redirection
2. Disable directory browsing
- look for /etc/httpd/conf/httpd.conf
- search for FollowSymLinks
- remove index from that line and make it like " Options FollowSymLinks"
*** service httpd restart , each time after you make changes to httpd.conf file so as to make it effective immediately ***
總網頁檢視次數
星期三, 8月 15, 2007
星期二, 3月 27, 2007
Oracle Command
To connect to db
sqlplus USERNAME/PASSWORD@CONNECT_IDEN
After connect to db
show all // show all configuration information
select * from v$instance // show your current
select owner, table_name from all_tables
desc for list table structure
sqlplus USERNAME/PASSWORD@CONNECT_IDEN
After connect to db
show all // show all configuration information
select * from v$instance // show your current
select owner, table_name from all_tables
desc
星期四, 3月 22, 2007
CentOS 3.8 Server Setup
1. mkdir /backup
2. wget all source files, mysql+apache+php (php5 is not ok for CentOS 3.8)
3. rpm -ivh *.rpm // for mysql setup files
4. yum install perl-DBI // fullfill mysql deps
5. yum install gcc // fulfill apache install deps
6. in apache tar directory
$./configure --prefix=/usr/local/apache2
or (when you have any error related to apr...)
$./configure --enable-so --enable-mods-shared=expires,ssl,headers,http,info,rewrite --with-apr=/backup/httpd-2.2.4/srclib/apr/ --with-apr-util=/backup/httpd-2.2.4/srclib/apr-util/
$ make
$ make install
$ /usr/local/spache2/bin/apachectl start
Refer to http://httpd.apache.org/docs/2.2/install.html for more details
7. extract php source
8. yum install flex // fulfill php compile deps
9. yum install bison // fulfill php comple deps
10. yum install libxml libxml-devel libxml2-devel // fulfill php comple deps
11. ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
12. make
13. make install
14. refer to /php-4.4.6/INSTALL for the rest of configuration
After that, I have Mysql5.0 + Apache 2 + PHP 4 in my server
PHP compile options
// add graphical support
yum install libjpeg-devel
yum install libpng-devel
yum install zlib-devel
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib-dir=usr/share/doc/zlib-1.1.4
yum install libpng-devel
2. wget all source files, mysql+apache+php (php5 is not ok for CentOS 3.8)
3. rpm -ivh *.rpm // for mysql setup files
4. yum install perl-DBI // fullfill mysql deps
5. yum install gcc // fulfill apache install deps
6. in apache tar directory
$./configure --prefix=/usr/local/apache2
or (when you have any error related to apr...)
$./configure --enable-so --enable-mods-shared=expires,ssl,headers,http,info,rewrite --with-apr=/backup/httpd-2.2.4/srclib/apr/ --with-apr-util=/backup/httpd-2.2.4/srclib/apr-util/
$ make
$ make install
$ /usr/local/spache2/bin/apachectl start
Refer to http://httpd.apache.org/docs/2.2/install.html for more details
7. extract php source
8. yum install flex // fulfill php compile deps
9. yum install bison // fulfill php comple deps
10. yum install libxml libxml-devel libxml2-devel // fulfill php comple deps
11. ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
12. make
13. make install
14. refer to /php-4.4.6/INSTALL for the rest of configuration
After that, I have Mysql5.0 + Apache 2 + PHP 4 in my server
PHP compile options
// add graphical support
yum install libjpeg-devel
yum install libpng-devel
yum install zlib-devel
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib-dir=usr/share/doc/zlib-1.1.4
yum install libpng-devel
星期三, 3月 21, 2007
Useful Linux (CentOS) commands
yum remove package-name // remove package
yum list // show availiable package from server
yum install package-name // install package
yum localinstall package-name.rpm // try to install the rpm with deps
chkconfig --list // check list of running environment process
yum list // show availiable package from server
yum install package-name // install package
yum localinstall package-name.rpm // try to install the rpm with deps
chkconfig --list // check list of running environment process
CentOS 3.8 PHP 4.3.2 config file location
Default YUM installed PHP configure file location
/etc/php.ini
/etc/php.d
/etc/php.ini
/etc/php.d
CentOS 3.8 PHP MbString problem
when you first install phpmyadmin and it shows the following error
Warning: mb_internal_encoding(): Unknown encoding "big5" in /var/www/html/phpmyadmin/libraries/string.lib.php on line 41Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/libraries/common.lib.php on line 2404Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/libraries/common.lib.php on line 2404Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/libraries/common.lib.php on line 2354Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/index.php on line 101
You can edit the /var/www/html/phpmyadmin/libraries/string.lib.php line 41 to comment out that line by
change it from
mb_internal_encoding($GLOBALS['charset']);
to
// mb_internal_encoding($GLOBALS['charset']);
and then you can reload your page again and you can see that .. and then you have to setup your language to any one rather than "Chinese Traditional Big5". I choose UTF8 and then you can del the comment for line 41 and everything will works fine .. remember dont' choose Big5 after you del the comment. If not, you have to do so again.
Warning: mb_internal_encoding(): Unknown encoding "big5" in /var/www/html/phpmyadmin/libraries/string.lib.php on line 41Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/libraries/common.lib.php on line 2404Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/libraries/common.lib.php on line 2404Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/libraries/common.lib.php on line 2354Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/phpmyadmin/libraries/string.lib.php:41) in /var/www/html/phpmyadmin/index.php on line 101
You can edit the /var/www/html/phpmyadmin/libraries/string.lib.php line 41 to comment out that line by
change it from
mb_internal_encoding($GLOBALS['charset']);
to
// mb_internal_encoding($GLOBALS['charset']);
and then you can reload your page again and you can see that .. and then you have to setup your language to any one rather than "Chinese Traditional Big5". I choose UTF8 and then you can del the comment for line 41 and everything will works fine .. remember dont' choose Big5 after you del the comment. If not, you have to do so again.
訂閱:
文章 (Atom)