Pages

Sunday, September 22, 2013

Linux LAMPP installation


http://www.apachefriends.org/en/xampp-linux.html#374

  1. Go to a Linux shell and login as the system administrator root:
    su
  2. Change the permissions to the installer
    chmod 755 xampp-linux-1.8.2-0-installer.run
  3. Run the installer
    ./xampp-linux-1.8.2-0-installer.run
That's all. XAMPP is now installed below the /opt/lampp directory.

==========
 cd /opt/lampp/
cp lampp old-lampp
vi lampp 

//find . $XAMPP_ROOT/share/xampp/xampplib and add two line above this line and save this file
XMPP_OS="Linux"
XAMPP_ROOT="/opt/lampp"
. $XAMPP_ROOT/share/xampp/xampplib

# search if test $(osguess) = "rh9" and replace by bellow
# do we have that new red hat linux 9 with posix native threads?
if test "$(osguess)" = "rh9"


test -f /etc/vfstab
 groupadd nogroup
/opt/lampp/lampp start
/opt/lampp/lampp restart

 vi /opt/lampp/etc/extra/httpd-xampp.conf


Step 3: Start
To start XAMPP simply call this command:
/opt/lampp/lampp start
You should now see something like this on your screen:
Starting XAMPP 1.8.2...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.
Ready. Apache and MySQL are running.
If you get any error messages please take a look at the 

Step 4: Test
OK, that was easy but how can you check that everything really works? Just type in the following URL at your favourite web browser:
http://localhost
Now you should see the start page of XAMPP containing some links to check the status of the installed software and some small programming examples.


/opt/lampp/lampp could only start and stop XAMPP. Since version 0.9.5 it learned a lot of new things to do.
START AND STOP PARAMETERS
ParameterDescription
startStarts XAMPP.
stopStops XAMPP.
restartStops and starts XAMPP.
startapacheStarts only the Apache.
startsslStarts the Apache SSL support. This command activates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay activated.
startmysqlStarts only the MySQL database.
startftpStarts the ProFTPD server. Via FTP you can upload files for your web server (user "nobody", password "lampp"). This command activates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay activated.
stopapacheStops the Apache.
stopsslStops the Apache SSL support. This command deactivates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay deactivated.
stopmysqlStops the MySQL database.
stopftpStops the ProFTPD server. This command deactivates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay deactivated.
securityStarts a small security check programm. 

Thursday, September 19, 2013

Update older kernel to 3.11 or Installing Kernel 3.11 in CentOS or Redhat or Fedora

Update older kernel to 3.11 or Installing Kernel 3.11 in Redhat/CentOS/Fedora


To install Kernel 3.11 you must install all the required dependency packages and keep your system packages up-to-date. To do this just follow all the below commands as root user.

Step 1: Installing Kernel 3.11 Dependencies
Let’s first install dependencies packages gcc, ncurses and then update the system.

#  yum install gcc ncurses ncurses-devel

#  yum update

Step 2: Downloading Kernel 3.11 Source
Download the latest Kernel 3.11 using wget command under /tmp directory. You can also download the latest kernel by going to http://www.kernel.org/.

#  cd /tmp
#  wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.11.1.tar.xz

Step 3: Extracting Kernel 3.11 Source
Once the file is downloaded extract it under /usr/src/ directory by running the below command.
#  tar -Jxvf linux-3.11.1.tar.xz -C /usr/src/
#  cd /usr/src/linux-3.11/

Step 4: Configuring Kernel 3.11 Source
                                                             For New Kernel Configuration
Now run the make menuconfig command to configure the Linux kernel. Once you execute the below command a pop up window appears with all the menus. Here you can select your new kernel configuration. If you unfamiliar with these menus, just hit ESC key to exit.
#   make menuconfig 
You will get similar to below screen, where you see number of menus to select configuration for your latest kernel.  Kernel 3.11 Configuration Menu


                                                        For Old Kernel Configuration
If you like to configure your latest kernel with old configuration then simple type the below command.
#  make oldconfig

Step 5: Compiling Kernel 3.11
Next, type the make command to compile the Kernel 3.11. The compilation would take at least 30-40 minutes depends on your system configuration.
#   make

Step 5: Installing Kernel 3.11
Once the compliation completes cleanly, now install the Kernel 3.11 in your Linux system. The below command will create files under /boot directory and also make a new kernel entry in your grub.conf file.
#   make modules_install install

Step 6: Verifying Kernel 3.11
Edit grub to default boot by kernet-3.11
# vi /etc/grub.conf
  default=0

save and reboot server

To verify newly installed Kernel just type the following command on the terminal.
#  uname -r

And, That’s it. We hope this article will be much helpful to you all. If you’re facing any problems or difficulties while compiling or installing feel free to ask or post your questions using our comment form below.


Wildcard DNS record / any subdomain resolve one IP (wilcard)



A wildcard DNS record in a zone file looks similar to this example:

MX                                  IN   A       192.168.50.1
mail                                 IN   A        192.168.50.2

*.tayab.com.    IN   CNAME mail.tayab.com.
(this will be  anyname.tayab.com  refer to IP 192.168.50.2)

or

*.tayab.com.   3600 IN  MX 10 mx.tayab.com.


This wildcard DNS record will cause DNS lookups on domain names ending in tayab.com that
do not exist to have MX records synthesized for them.
So, any lookup for the MX record for somerandomname.tayab.com would return an MX record pointing to mx.tayab.com.





Wednesday, September 18, 2013

phpmyadmin phpMyAdmin installation in Linux (CentOS/Redhat/Fedora)

##########################
CentOS 7 phpMyAdmin / phpmyadmin Installation by yum
===========================================
Add the repository named EPEL by
rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum -y update
yum -y install php php-mysql php-pdo php-gd php-mbstring
yum -y install phpmyadmin


Allow IP or network to browse this

vi /etc/httpd/conf.d/phpMyAdmin.conf

Require ip 127.0.0.1
Allow from 127.0.0.1
Require ip 127.0.0.1
Allow from 127.0.0.1


and
 vi /etc/httpd/conf/httpd.conf
<Directory "/usr/share/phpMyAdmin/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    ALLow from 203.190.8.0/21
</Directory>

systemctl restart httpd

now browse:: http://serverip/phpMyAdmin

======================================
==========================================
Other versions of Linux

======================================
-=--------------------------------------------------------------

Select your proper baseurl directory by browsing this link
========= phpmyadmin
vi /etc/yum.repos.d/RHELx64.repo
[MyRHEL6x86]
name=My-RHEL-6-third-party-repositories
baseurl=http://autoinstall.pp.parallels.com/PSA_10.2.0/thirdparty-rpm-RedHat-el6-x86_64/
enabled=1
gpgcheck=0

======================================
yum install php-mbstring php-mcrypt php-mysql


Go to your web directory

# cd /var/www/html/

Grab it down to your server

# wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.0.2/phpMyAdmin-4.0.2-all-languages.tar.gz
OR...
# wget https://files.phpmyadmin.net/phpMyAdmin/4.6.4/phpMyAdmin-4.6.4-all-languages.tar.gz

Unarchive

# tar -zxvf phpMyAdmin-4.0.2-all-languages.tar.gz

You'll end up with a directory /var/www/html/phpMyAdmin-4.0.2-all-languages so rename it

# mv phpMyAdmin-4.0.2-all-languages phpMyAdmin

Then change the permissions so Apache can execute.

Change directory and create a config file

# cd phpMyadmin

# mv config.sample.inc.php config.inc.php


If shows permission denied in phpMyAdmin
vi /etc/httpd/conf.d/phpMyAdmin.conf

Alias /phpMyAdmin /var/www/html/phpMyAdmin
Alias /phpmyadmin /var/www/html/phpMyAdmin

<Directory /var/www/html/phpMyAdmin/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1 203.190.8.0/21
   </IfModule>
</Directory>

service httpd restart

Now Browse: http://serverip/phpmyadmin

Monday, September 16, 2013

Mysql root password reset when forgot root password and permission



## At First stop Mysql service

/etc/init.d/mysqld stop

###Now lets start up the mysql daemon and skip the grant tables which store the passwords.

 mysqld_safe --skip-grant-tables &



## Now go to another terminal and type bellow for login without password

mysql --user=root mysql



update user set Password=PASSWORD('newpassword') where user='root';

flush privileges;


update user set Select_priv='Y', Insert_priv='Y',Update_priv='Y',Delete_priv='Y',
        Create_priv='Y',Drop_priv='Y',Reload_priv='Y',Shutdown_priv='Y',
        Process_priv='Y',File_priv='Y',Grant_priv='Y',References_priv='Y',
        Index_priv='Y',Alter_priv='Y',Show_db_priv='Y',Super_priv='Y',
        Create_tmp_table_priv='Y',Lock_tables_priv='Y',Execute_priv='Y',
        Repl_slave_priv='Y',Repl_client_priv='Y',Create_view_priv='Y',
        Show_view_priv='Y',Create_routine_priv='Y',Alter_routine_priv='Y',
        Create_user_priv='Y',Event_priv='Y',Trigger_priv='Y' where User='root';


exit;

### New Start Mysql service

/etc/init.d/mysqld start


###New Enter with new password with ALL/Full privilege

mysql -u root -p
newpassword