Install autoconf:
Code:
apt-get install autoconf
Install APC using PECL:
Code:
pecl install apc
After install process we have messages like this:
Code:
Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/apc.so'
install ok: channel://pecl.php.net/APC-3.0.19
configuration option "php_ini" is not set to php.ini location
You should add "extension=apc.so" to php.ini
Edit php.ini (via DA or directly: /usr/local/lib/php.ini)
modify extension_dir directive:
Code:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"
Enable extension apc.so:
Code:
extension=apc.so
Tuesday, April 16, 2013
HOW-TO: Install APC Direct admin
CustomBuild 2.0 FAQ (DirectAdmin 1.43 or later is needed)
1. What is custombuild?
Custombuild is a tool, which can install/update:
Apache
AWstats
Autoconf
Automake
ClamAV
cURL
Dovecot
Exim configuration files
FreeType
GD
ionCube loaders
libiconv
libjpeg
libpng
libmcrypt
libmhash
mod_perl
mod_ruid2
nginx
MySQL
PHP (mod_php, php-fastcgi, PHP-FPM, suPHP)
ProFTPD
Pure-FTPd
SpamAssassin
Webalizer
Zend Optimizer
Zlib
Update web-applications:
Roundcube webmail
Squirrelmail webmail
phpMyAdmin
How to upgrade custombuild to 2.0?
The best way to do that is a complete reinstallation of CustomBuild, because of changes in configuration files, options.conf etc. Please note that you need DirectAdmin version 1.43 RC1 at least (you can use current pre-release binaries too) to run CustomBuild 2.0.
Code:
+++++++++++
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
../build
Please check your options.conf file, set the settings you would like to have. The following steps are needed after upgrade of the CustomBuild script, if you would like to use apache:
+++++++++++++++
Code:
../build apache
../build php n
../build rewrite_confs
However, if you want to rebuild everything:
+++++++++++++++++
Code:
../build all d
3. How to install custombuild 2.0?
Code:
cd /usr/local/directadmin
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
../build
You need to run this command for the first time:
Code:
../build all d
=========
http://forum.directadmin.com/showthread.php?t=44743
=========
Custombuild is a tool, which can install/update:
Apache
AWstats
Autoconf
Automake
ClamAV
cURL
Dovecot
Exim configuration files
FreeType
GD
ionCube loaders
libiconv
libjpeg
libpng
libmcrypt
libmhash
mod_perl
mod_ruid2
nginx
MySQL
PHP (mod_php, php-fastcgi, PHP-FPM, suPHP)
ProFTPD
Pure-FTPd
SpamAssassin
Webalizer
Zend Optimizer
Zlib
Update web-applications:
Roundcube webmail
Squirrelmail webmail
phpMyAdmin
How to upgrade custombuild to 2.0?
The best way to do that is a complete reinstallation of CustomBuild, because of changes in configuration files, options.conf etc. Please note that you need DirectAdmin version 1.43 RC1 at least (you can use current pre-release binaries too) to run CustomBuild 2.0.
Code:
+++++++++++
cd /usr/local/directadmin
mv custombuild custombuild_1.x
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
../build
Please check your options.conf file, set the settings you would like to have. The following steps are needed after upgrade of the CustomBuild script, if you would like to use apache:
+++++++++++++++
Code:
../build apache
../build php n
../build rewrite_confs
However, if you want to rebuild everything:
+++++++++++++++++
Code:
../build all d
3. How to install custombuild 2.0?
Code:
cd /usr/local/directadmin
wget -O custombuild.tar.gz http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
../build
You need to run this command for the first time:
Code:
../build all d
=========
http://forum.directadmin.com/showthread.php?t=44743
=========
Sunday, April 7, 2013
MYSQL
mysql> create database kerala_wp1;
Query OK, 1 row affected (0.00 sec)
mysql> create user wp1;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON kerala_wp1.* TO 'wp1'@localhost IDENTIFIED BY 'keralainasia';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE ALL PRIVILEGES ON kerala_wp1.* FROM 'wp1'@localhost;
Query OK, 0 rows affected (0.00 sec)
# [mysql dir]/bin/mysql -h hostname -u root -p
mysql> create database [databasename];
mysql> show databases;
mysql> use [db name];
mysql> show tables;
mysql> describe [table name];
mysql> drop database [database name];
mysql> drop table [table name];
mysql> SELECT * FROM [table name];
mysql> show columns from [table name];
grant usage on *.* to bob@localhost identified by ‘passwd’;
grant all privileges on databasename.* to username@localhost;
flush privileges;
SET PASSWORD FOR ‘user’@'hostname’ = PASSWORD(‘passwordhere’);
+ Check, Repair and Optimize All tables in All Databases when you’re running a MySQL server on Linux.
# mysqlcheck –auto-repair –check –optimize –all-databases
OR
# mysqlcheck –all-databases -r #repair databases
# mysqlcheck –all-databases -a #analyze databases
# mysqlcheck –all-databases -o #optimize databases
=> Check, Repair and Optimize Single Database Tables.
# mysqlcheck –auto-repair –check –optimize CpanelUsername_Databasename
# mysqlcheck -ro CpanelUsername_Databasename
=> To repair One Table in database:
# mysqlcheck -ro CpanelUsername_Databasename table_name
Shows you if any need repair:
# myisamchk –check /var/lib/mysql/*/*.MYI
Then try ‘safe-recover’ first:
# myisamchk –safe-recover /var/lib/mysql/*/*.MYI
and, if neither “safe-recover” or “recover” option works:
# myisamchk –recover /var/lib/mysql/*/*.MYI
Then use the ‘force’ flag:
# myisamchk –recover –extend-check –force /var/lib/mysql/*/*.MYI
mysql> REVOKE INSERT,UPDATE,DELETE ON DATABASENAME.* FROM user1@localhost;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user]…
REVOKE ALL PRIVILEGES OPTION FROM 'wp1'@'localhost';
REVOKE ALL PRIVILEGES ON kerala_wp1.* FROM 'wp1'@localhost;
Dump a table from a database.
[mysql dir] mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql
Restore database (or database table) from backup.
[mysql dir] mysql -u username -ppassword databasename < /tmp/databasename.sql
mysql> create database kerala_wp1;
Query OK, 1 row affected (0.00 sec)
mysql> create user wp1;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON kerala_wp1.* TO 'wp1'@localhost IDENTIFIED BY 'keralainasia';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE ALL PRIVILEGES ON kerala_wp1.* FROM 'wp1'@localhost;
Query OK, 0 rows affected (0.00 sec)
Query OK, 1 row affected (0.00 sec)
mysql> create user wp1;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON kerala_wp1.* TO 'wp1'@localhost IDENTIFIED BY 'keralainasia';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE ALL PRIVILEGES ON kerala_wp1.* FROM 'wp1'@localhost;
Query OK, 0 rows affected (0.00 sec)
# [mysql dir]/bin/mysql -h hostname -u root -p
mysql> create database [databasename];
mysql> show databases;
mysql> use [db name];
mysql> show tables;
mysql> describe [table name];
mysql> drop database [database name];
mysql> drop table [table name];
mysql> SELECT * FROM [table name];
mysql> show columns from [table name];
grant usage on *.* to bob@localhost identified by ‘passwd’;
grant all privileges on databasename.* to username@localhost;
flush privileges;
SET PASSWORD FOR ‘user’@'hostname’ = PASSWORD(‘passwordhere’);
+ Check, Repair and Optimize All tables in All Databases when you’re running a MySQL server on Linux.
# mysqlcheck –auto-repair –check –optimize –all-databases
OR
# mysqlcheck –all-databases -r #repair databases
# mysqlcheck –all-databases -a #analyze databases
# mysqlcheck –all-databases -o #optimize databases
=> Check, Repair and Optimize Single Database Tables.
# mysqlcheck –auto-repair –check –optimize CpanelUsername_Databasename
# mysqlcheck -ro CpanelUsername_Databasename
=> To repair One Table in database:
# mysqlcheck -ro CpanelUsername_Databasename table_name
Shows you if any need repair:
# myisamchk –check /var/lib/mysql/*/*.MYI
Then try ‘safe-recover’ first:
# myisamchk –safe-recover /var/lib/mysql/*/*.MYI
and, if neither “safe-recover” or “recover” option works:
# myisamchk –recover /var/lib/mysql/*/*.MYI
Then use the ‘force’ flag:
# myisamchk –recover –extend-check –force /var/lib/mysql/*/*.MYI
mysql> REVOKE INSERT,UPDATE,DELETE ON DATABASENAME.* FROM user1@localhost;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user]…
REVOKE ALL PRIVILEGES OPTION FROM 'wp1'@'localhost';
REVOKE ALL PRIVILEGES ON kerala_wp1.* FROM 'wp1'@localhost;
Dump a table from a database.
[mysql dir] mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql
Restore database (or database table) from backup.
[mysql dir] mysql -u username -ppassword databasename < /tmp/databasename.sql
mysql> create database kerala_wp1;
Query OK, 1 row affected (0.00 sec)
mysql> create user wp1;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON kerala_wp1.* TO 'wp1'@localhost IDENTIFIED BY 'keralainasia';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE ALL PRIVILEGES ON kerala_wp1.* FROM 'wp1'@localhost;
Query OK, 0 rows affected (0.00 sec)
Subscribe to:
Posts (Atom)