GRANT ALL PRIVILEGES ON *.* TO root@192.168.1.131 IDENTIFIED BY “*************”;
To get a list of MySQL users:
GRANT ALL PRIVILEGES ON *.* TO root@192.168.1.131 IDENTIFIED BY “*************”;
To get a list of MySQL users:
nano /etc/my.cnf
Now that the file is backed up let’s open this baby up for editing. When you have the file open you are going to want to look for this line:
bind-address = 127.0.0.1
What the above line does is limit connections to the localhost and only the localhost. You want to comment this line out by changing it to:
#bind-address = 127.0.0.1
Now save that file and restart MySQL with the command:
service mysqld restart
mysql -u root -p
Where root is the MySQL administrative user (most like it is root).
You will be prompted for the MySQL administrators password. After you have successfully authenticated you will have a new prompt that looks like:
mysql>
You are now at the MySQL prompt. You only have one command to enter for this to work. You will want to enter this command carefully:
GRANT ALL PRIVILEGES ON *.* TO username@address IDENTIFIED BY “password”;
Where username is the username on the remote machine that will be connecting, address is the IP address of the remote machine, andpassword is the password that will be used by the remote user.
When that command is issued successfully you should see something like:
Query OK, 0 rows affected (0.00 sec)
As long as you get Query OK, you should be good to go.
Full Reff: http://www.ghacks.net/2009/12/27/allow-remote-connections-to-your-mysql-server/
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=xx:xx:xx:xx:xx:xx
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
NM_CONTROLLED=yes
PEERDNS=yes
IPADDR=192.168.0.101
NETMASK=255.255.255.0
Now, configure default getaway:
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.0.1
Configure DNS Server
# vi /etc/resolv.conf
; generated by /sbin/dhclient-script
search your_dns-domain-name.com
nameserver 192.168.1.5
nameserver 192.168.1.6
# /etc/init.d/network restart
cat /etc/redhat-release
yum install xinetd
yum install telnet
1. vi /etc/xinetd.d/telnet
2. you will see file like that, you will see last line disable, replace disable = yes to disable = no and save file.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = yes (need to replace with no)
}
3. restart xinetd service
# /etc/init.d/xinetd restart
4. if it still not work, then iptables is blocking that, you need to flush iptables or turn off service like
# iptables -F
# iptables -X
# /etc/init.d/xinetd stop
nano /etc/sysconfig/network
To make changes to sudo from putty/bash:
Step 1. Installation of required packages.
We use yum to install BIND packages.
# yum -y install bind bind-libs bind-utils
Step 2. Set BIND service start on system boot (Optional)
# chkconfig –-level 35 named on
Step 3. Start named service for generating some default configuration files.
# service named start
Step 4. Edit main configuration file and add zone entry of http://www.monirblog.com.
# vi /etc/named.conf Check allow query {any;}
add the following lines: zone "." IN { type hint; file "named.ca"; }; zone "monirblog.com" { type master; file "monirblog.com.fwd"; }; zone "0.168.192.in-addr.arpa" { type master; file "monirblog.com.rev"; }; include "/etc/named.rfc1912.zones";
Step 5. Create Zone files which we mentioned in named.conf file.
# cd /var/named
(If permission denied then type the following)
# chmod 775 /var/named/
# vi monirblog.com.fwd $ORIGIN monirblog.com. $TTL 3D @ SOA dns.monirblog.com. root.monirblog.com. (12 4h 1h 1w 1h) @ IN NS dns.monirblog.com. dns.monirblog.com. IN A 192.168.0.211 www IN A 192.168.0.211 # vi monirblog.com.rev $ORIGIN 0.168.192.in-addr.arpa. $TTL 3D @ SOA dns.monirblog.com. root.monirblog.com. (12 4h 1h 1w 1h) @ IN NS dns.monirblog.com. 211 IN PTR dns.monirblog.com.
Step 6. Restart BIND Service
# service named restart
Step 7. Test your DNS server
Note : Before testing , make sure your /etc/resolve.conf file contain DNS server ip that has been set up.
# cat /etc/resolve.conf search monirblog.com nameserver 192.168.0.211 # nslookup www.monirblog.com Server: 192.168.0.211 Address: 192.168.0.211#53 Name: www.monirblog.com Address: 192.168.0.211 # nslookup 192.168.0.211 Server: 192.168.0.211 Address: 192.168.0.211#53 211.0.168.192.in-addr.arpa name = dns.monirblog.com. Reff: 1. http://www.broexperts.com/2012/03/linux-dns-bind-configuration-on-centos-6-2/ 2. http://studyhat.blogspot.com/2012/02/dns-configuration-on-centos-redhat-62.html 3. http://www.revsys.com/writings/quicktips/bind-permission.html
If you by default in text mode of Centos, you can change the graphical mode by typing: startx
Further details explanation from here are as follows:
Variable that I used as below:
OS: CentOS 6.2 64bit
Desktop environment: GNOME
1. Using yum, we will need to install X Windows System as the based for GUI and rich input device capability:
$ yum groupinstall -y 'X Window System' |
2. Only then we can install GNOME desktop environment on top of it:
$ yum groupinstall -y 'Desktop' |
3. Since previously the server is running on CLI mode, we need to change some value to tell CentOS to boot up in the GUI mode. Open /etc/inittab via text editor and change following line:
id:3:initdefault: |
To:
id:5:initdefault: |
4. Reboot:
$ init 6 |
Note: You can switch from GUI to CLI mode manually by using following method:
GUI to CLI: Ctrl + Alt + F6
CLI to GUI: Ctrl + Alt + F1
If you want to start the desktop from CLI console (not SSH session), use following command:
$ startx |
In some cases, when you login into the system via GUI, you will see some kind of weird boxes replacing the fonts. You can overcome this problem by installing fonts group via yum:
$ yum groupinstall -y fonts |
Done! We now have user-friendly interface like below: