مدیریت سرورها

آموزش مدیریت سرورهای لینوکس و ویندوز

مدیریت سرورها

آموزش مدیریت سرورهای لینوکس و ویندوز

سایت در باره انواع آموزشها در زمینه IT می باشد.
مانند: لینوکس، ویندوز، سیسکو، میکروتیک، طراحی وب
به دلیل شخصی بودن وبلاگ ارائه مطالب متفرقه در آن بلامانع است.
با تشکر

طبقه بندی موضوعی
۰۸
تیر

$ cd
$ vi .bash_profile

OR
$ vi $HOME/.bashrc
Append the following line:
export PS1="\e[0;31m[\u@\h \W]\$ \e[m"
Save and close the file.

To do this changing you must logout an login again.

A list of color codes

Color Code
Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33

Note: You need to replace digit 0 with 1 to get light color version.



----------------------------- In Ubuntu 14.4 --------------------------

Run the following command in a terminal:

gedit ~/.bashrc

When .bashrc opens, locate and uncomment force_color_prompt=yes (that is, remove the hash, so it no longer looks like: #force_color_prompt=yes).

Save the file, and open a new terminal window, and you should already see a change (the prompt should be Light Green, which is defined by 1;32). You can then change any colour value you like; eg: 0;35 = Purple.

To edit the colour values, locate the following section, and change the default values with some of the examples listed further down:

if [ "$color_prompt" = yes ]; then
    PS1=’${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;31m\]\w\[\033[00m\]\$ 
else
    PS1=’${debian_chroot:+($debian_chroot)}\u@\h:\w\$ 
fi

You can check out this Bash colour chart for a full range of colour values, but here are a few basic ones you can play around with (note that “Light” isn’t what you might think – it actually means “bold”): Black 0;30 – Dark Gray 1;30 – Blue 0;34 – Light Blue 1;34 – Green 0;32 – Light Green 1;32 – Cyan 0;36 – Light Cyan 1;36 – Red 0;31 – Light Red 1;31 – Purple 0;35 – Light Purple 1;35 – Brown 0;33 – Yellow 1;33 – Light Gray 0;37 – White 1;37

For example, here is the line that I use it:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\] \w\[\033[01;37m\] > '


  • طاهر ضیائی
۰۲
تیر

root@www:~# vi /etc/apache2/sites-available/virtual.host

# create a file for virtual.host

 <VirtualHost *:80>

    ServerName www.virtual.host

    ServerAdmin webmaster@virtual.host

    DocumentRoot /home/wheezy/public_html

    ErrorLog /var/log/apache2/virtual.host.error.log

    CustomLog /var/log/apache2/virtual.host.access.log combined

    LogLevel warn

</VirtualHost>


root@www:~# a2ensite virtual.host 

Enabling site virtual.host.

To activate the new configuration, you need to run:

  service apache2 reload

root@www:~# service apache2 reload

  • طاهر ضیائی
۰۱
تیر

در زمان اضافه کردن یک virtual host در آپاچی ممکن است این خطا مشاهده شود.

خطای داده شده :

root@tsrv:~# a2ensite vh.postfixhelp.html

ERROR: Site vh.postfixhelp.html does not exist!


راه حل:

a2ensite is simply a perl script that only works with filenames ending .conf

Therefore, I have to rename my setting file for mysite.com to mysite.com.conf as might be achieved as follows:

mv /etc/apache2/sites-available/mysite.com /etc/apache2/sites-available/mysite.com.conf

Success


  • طاهر ضیائی
۰۱
تیر

از طریق لینک زیر می توانید سایت یا وبلاگ خود را در 70 موتور جستجو از جمله گوگل بطور رایگان ثبت نمایید:

http://www.submitexpress.com/free-submission.html

  • طاهر ضیائی
۳۰
خرداد
  • طاهر ضیائی
۲۹
خرداد

Picture of the Play To dialog box

Turn on streaming

Your computer needs to detect suitable playback devices on your network before you can use Play To to stream media. That means media streaming must be turned on, if you haven't already done so. To turn on media streaming on your home network in Windows Media Player, follow these steps:

  1. Click the Start button Picture of the Start button, click All Programs, and then click Windows Media Player.
    If the Player is currently open and you’re in Now Playing mode, click the Switch to Library button Picture of the Switch to Library button in the upper-right corner of the Player.
  2. Click Stream, and then click Turn on home media streaming.

    Turn on home media streaming won't be available on the Stream menu if streaming is already turned on.

  3. In Media streaming options, click Turn on media streamingAdministrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  4. Click OK.

  • طاهر ضیائی
۲۳
خرداد



  • طاهر ضیائی
۱۸
خرداد

SMTP

telnet: > telnet mx1.example.com smtp
telnet: Trying 192.0.2.2...
telnet: Connected to mx1.example.com.
telnet: Escape character is '^]'.
server: 220 mx1.example.com ESMTP server ready Tue, 20 Jan 2004 22:33:36 +0200
client: HELO client.example.com
server: 250 mx1.example.com
client: MAIL from: <sender@example.com>
server: 250 Sender <sender@example.com> Ok
client: RCPT to: <recipient@example.com>
server: 250 Recipient <recipient@example.com> Ok
client: DATA
server: 354 Ok Send data ending with <CRLF>.<CRLF>
client: From: sender@example.com
client: To: recipient@example.com
client: Subject: Test message
client: 
client: This is a test message.
client: .
server: 250 Message received: 20040120203404.CCCC18555.mx1.example.com@client.example.com
client: QUIT
server: 221 mx1.example.com ESMTP server closing connection

  • طاهر ضیائی
۲۲
دی

Question: When I installed the Linux OS, I forgot to set the proper timezone. How do I change the timezone on my Linux distribution. I use CentOS (Red Hat Linux). But, can you please explain me how to do this on all Linux distributions with some clear examples.

Answer: Use one of the following methods to change the timezone on your Linux system. One of these methods should work for you depending on the Linux distribution you are using.

  • طاهر ضیائی
۱۹
دی

want to extract tar file to specific directory called /tmp/data. How can I extract a tar archive to a different directory using tar command on a Linux or Unix-like systems?


You do not need to change the directory using cd command and extract files. Untarring a file can be done using the following syntax:


Syntax

Typical Unix tar syntax:
tar -xf file.name.tar -C /path/to/directory

GNU/tar syntax:
tar xf file.tar -C /path/to/directory

tar xf file.tar --directory /path/to/directory

  • طاهر ضیائی