Thanks for you all .So now i am in a right place to learn and get scripts ..
About me : I am new to Linux but i need to install few things minimum 2 or 3 things daily on linux boxes like cent or Debian
i like to learn the scripting to do below job .This is on mysql server tables creation and secure installation .
Need scripting code : 1
Code:
# chkconfig mysqld on
# service mysqld start
# /usr/bin/mysql_secure_installation
# mysql -p
#$$$$$$$$$$$$$$$$$$$$$ NOTE $$$$$$$$$$$$$$$$$$$$$$$$$$$
#$ Change the root password? yes
#$ New password :[secret
#$ Remove anonymous users?yes
#$ Disallow root login remotely? yes[
#$ Remove test database and access to it?yes
#$ Reload privilege tables now? yes
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
# mysql -u root -p
mysql> CREATE USER [email=""]'nila'@'%'[/email] IDENTIFIED BY 'secret';
mysql> GRANT USAGE ON *.* TO [email=""]'nila'@'%'[/email] IDENTIFIED BY 'secret';
mysql> CREATE DATABASE IF NOT EXISTS `nila`;
mysql> GRANT ALL PRIVILEGES ON `nila`.* TO [email=""]'nila'@'%'[/email];
mysql> CREATE USER 'synchro'@'%' IDENTIFIED BY 'secret';
mysql> GRANT USAGE ON *.* TO 'synchro'@'%' IDENTIFIED BY 'secret';
mysql> GRANT SELECT ON `nilaweb`.* TO 'synchro'@'%';
mysql> GRANT DELETE ON `nilaweb`.`deleted_equiv` TO 'synchro'@'%';
mysql> GRANT UPDATE (`CHECKSUM`) ON `nilaweb`.`hardware` TO 'synchro'@'%';
mysql> FLUSH PRIVILEGES;
mysql> exit
#$$$$$$$ NOTE $$$$$$$$$$$$$$$$$$$$$$$$$
I need to check the mysqld service
service mysqld stop
service mysqld start
Need a code : 2
Code:
#### What i need ?
# yum -y update
# yum -y upgrade
# yum -y install gcc gcc-c++ make openssl-devel newt-devel ncurses-devel libtermcap-devel libxml2-devel kernel-devel perl curl curl-devel subversion httpd
# yum -y install libtool-ltdl libtool-ltdl-devel unixODBC-devel mysql mysql-devel mysql-server mysql-connector-odbc
#########
#cd /usr/src
#mkdir mysource
#cd mysource
# wget [url="h*tp://file1.tar.gz/
# wget [url="h*tp://file2.tar.gz/
# wget [url="h*tp://file3.tar.gz/
###### Untar Files
# tar zxvf file1.tar.gz
# tar zxvf file2.tar.gz
######Install File1
# cd /usr/src/mysource/file1
# make clean
# make
# make install
######Install File2
# cd /usr/src/mysource/file2
# make all
# make install
# make config
######Install File3
# cd /usr/src/mysource/file3
# make clean
# ./configure
# make menuselect
$$$$$$$$$$$$$$$$$$ NOTE : Here We need to stop select [b]F12 [/b]Key for accept $$$$$$$$$$$$$$$
# make
# make install
# make samples
# make config
# chkconfig file3 on
Need to create file name called /usr/src/tester.conf
Add the text on tester.conf
hello world
thanks for your support = big thanks
:wq!
cd\
Thanks
advance thanks for all forum members
k~