APC PHP Install Linux

Hi,

 

The following are the steps to install APC in your Linux server.

 

wget http://pecl.php.net/get/APC-3.1.9.tgz
tar -xvf APC-3.1.9.tgz
cd APC-3.1.9
phpize
./configure --enable-apc
make
make install

Then add the line to php.ini file.

extension=apc.so

Now restart Apache your php will be enabled with APC. You can check them with a sample phpinfo page.

Thank you for viewing helpinlinux.com

Nginx Htpasswd Directory

 

Hi,

 

Are you using Nginx and searching for an alternative for htpasswd.?.  Here you go, all you need to do is add the below lines in your virtual host configuration file.

 

location ~ /downloads {
root /path/to/reach/downloads/directory/;
autoindex on;
auth_basic "Restricted";
auth_basic_user_file /path/to/your/htpass/file;
}

 

If you are not sure how to create a htpasswd file for Nginx use the below command.

 

htpasswd -c htpass <username> <password>

 

Thank you for viewing helpinlinux.com

Your license could not be activated because cpanel

Your license could not be activated because:Cannot Read License File

If you are getting the below reply even if you have cPanel licence is active follow the solution

Solution:

Execute the command

# /usr/local/cpanel/cpkeyclt

You will get a similar output.

Updating cPanel license...Done. Update succeeded. Building global cache for cpanel...Done

 

Thank you for viewing helpinlinux.com

Apache source recompile with mpm-itk module

 

Hi,

 

If you want to run apache virtual host with its own user and group privileges. This module will make apache to access web contents with webcontent’s owner privileges. To do that you need mpm-itk module. If you have installed httpd with rpm you can install mpm-itk by steps from this.

 

To recompile apache with mpm-itk you need to use the option “–with-mpm=itk

wget http://mirrors.sonic.net/apache//httpd/httpd-2.2.21.tar.gz
tar -xvf httpd-2.2.21.tar.gz
cd httpd-2.2.21
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite\
 --with-mpm=itk
make
make install

That’s it you have compiled apache with itk module, now you need to add the virtual host entry for a domain as below.

ServerName domainname.com
DocumentRoot /path/to/web/root
AssignUserId username groupname

Then restart apache.

/etc/init.d/httpd restart

You can check by using the following command.

ps aux | grep username

It should return as below

username  32439  7.1  32880     S    16:28   0:00 httpd -k restart
username  32441  3.2  22788     S    16:28   0:00 httpd -k restart
username  32442  7.1  33024     S    16:28   0:00 httpd -k restart
username  32443  7.1  33024     S    16:28   0:00 httpd -k restart
username  32444  3.2  22788     S    16:28   0:00 httpd -k restart
username  32446  3.2  22788     S    16:28   0:00 httpd -k restart

 

Thank you for viewing helpinlinux.com

 

Redis install Linux

Hi,

 

The following steps will help you install redis in your Redhat/centos servers.

#yum install redis
#vi /etc/redis.conf

and edit the bind address from

127.0.0.1

to 
<server IP>

Then open your running php.ini file and add the following entries.

extension=redis.so 

session.save_handler = redis 
session.save_path = "tcp://<server IP>:6379/"

 

Thank you for viewing helpinlinux.com

Bookmarks in phpMyAdmin

 

Hi,

 

Are you trying to enable bookmarks in your phpMyAdmin page.?.. The following steps will help you to enable it.

Login to mysql

CREATE USER 'pma'@'localhost' IDENTIFIED by 'pmapass';
GRANT ALL PRIVILEGES ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';

Open the config.inc.php of your phpMyAdmin web document root

 

#vi config.inc.php

and edit the lines as below

 /* User used to manipulate with storage */
$cfg['Servers'][$i]['controluser'] = 'pma';  
$cfg['Servers'][$i]['controlpass'] = 'pmapass'; /* Storage database and tables */  
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';  
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';  
$cfg['Servers'][$i]['relation'] = 'pma_relation';  
$cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';  
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';  
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';  
$cfg['Servers'][$i]['history'] = 'pma_history';  
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';  
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';  
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

Then restore the database

mysql phpmyadmin < scripts/create_tables_mysql_4_1_2+.sql

 

Thank you for viewing helpinlinux.com