ブログ

サーバー

自分のサーバーを運用する。VPS、VDS、専用サーバー、AlmaLinuxの管理、ファイアウォール、そしてサーバーを安全に保つためのコマンドを解説します。

How To Disable Firewalld On AlmaLinux A Step-By-Step Guide

Firewalld is the default firewall management tool on AlmaLinux, providing a dynamic way to manage firewall settings with support for network zones. While it's a crucial component for system security, there are scenarios where you might need to disable it temporarily or permanently. This guide will walk you through the steps to disable Firewalld, along with important considerations to keep your system secure.

1 分で読めます

Mastering Linux Server Commands Similarities and Differences Across Distributions

Linux is one of the most powerful and versatile operating systems, widely used for both personal computing and server management. Although different Linux distributions (or "distros") may seem distinct, many of their basic operations remain consistent across platforms. However, there are also key differences, especially when it comes to package management and system administration. In this article, we’ll explore both the commonalities and distinctions between Linux distributions, helping users

1 分で読めます

How To Disable The Firewall On AlmaLinux 9 Step-By-Step Guide

Firewalls play a crucial role in protecting systems by monitoring and controlling incoming and outgoing network traffic. However, there are scenarios where disabling the firewall may be necessary, such as when troubleshooting or during specific system configurations. In this article, we will walk you through the steps to disable a firewall. This is a general guide that can be applied to various systems, offering a clear, professional explanation suitable for a wide audience.

1 分で読めます

How To Check Your Almalinux Version 5 Easy Methods For Servers

Knowing the exact version of your Linux system can be crucial for troubleshooting, managing software, or simply staying informed about your system's capabilities. There are several methods you can use to check the version and distribution of Linux you're running. This article will walk you through the most common ways to gather this information efficiently.

1 分で読めます

How to Enable Short Open Tags in PHP 8.1 and Locate Your php.ini File

PHP developers often need to optimize their code to ensure compatibility with different server environments. One common feature in earlier versions of PHP is the use of short open tags (<? ), which are a shorthand for the standard PHP open tags (<?php ). However, with the release of PHP 8.0, the use of short open tags has been deprecated. Despite this, in certain scenarios, developers may want to enable them manually for legacy code or personal preference. This article outlines a step-by-step

1 分で読めます

Install and Manage Firewalls in AlmaLinux 9

A firewall is a security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. Firewalls act as a barrier between a trusted internal network and untrusted external networks, such as the internet. They are critical for preventing unauthorized access while allowing legitimate traffic to pass through. In this tutorial, we will walk you through the process of understanding, installing, configuring, and troubleshooting firewalls on AlmaLinux 9.

1 分で読めます

Installing and Managing NetworkManager in AlmaLinux 9

NetworkManager is an essential tool for managing network connections on AlmaLinux 9. It simplifies the process of configuring, maintaining, and troubleshooting network connections. In this guide, we will walk you through how to install NetworkManager, manage it (start, restart, and stop), troubleshoot common issues, and provide essential commands to ensure that your network is running smoothly.

1 分で読めます

aaPanel vs Webmin/Virtualmin Comprehensive Feature Comparison

As a hosting provider, selecting the right control panel is crucial for ensuring smooth server management and optimal performance. In this detailed comparison, we will explore the features, strengths, and weaknesses of two popular control panels: aaPanel and Webmin/Virtualmin. This guide will help you make an informed decision about which panel is best suited for your hosting environment.

1 分で読めます

Understanding and Securing Portmapper (rpcbind) Services on Your Server and How to Disabe

In the world of server administration, maintaining security is a paramount responsibility. Ensuring that your server is safeguarded against potential vulnerabilities can prevent a wide range of malicious activities, such as Distributed Denial of Service (DDoS) attacks, unauthorized access, and data breaches. One of the potential vulnerabilities that system administrators might encounter is the Portmapper service, also known as rpcbind. This article will delve into what the Portmapper service

1 分で読めます

What Are Dedicated Servers

Dedicated servers are among the most important technologies in the field of website hosting and business applications. These servers provide high performance and superior security compared to other options such as shared or virtual servers. In this article, we will cover all the information related to dedicated servers, including the definition, benefits, how they work, and their uses, with a comparison to other available options in the market.

1 分で読めます

What is Virtual Private Servers (VPS)

Virtual Private Servers (VPS) are an excellent solution for companies and individuals who need dedicated server resources without the significant investment in a standalone physical server. In this detailed article, we will cover everything you need to know about VPS, from definition and features to uses and frequently asked questions.

1 分で読めます

What Are Virtual Dedicated Servers (VDS)

Virtual Dedicated Servers (VDS) are modern technologies that allow users to benefit from the features of dedicated servers but at a lower cost and higher flexibility. In this article, we will cover everything related to virtual dedicated servers in terms of definition, benefits, how they work, and comparison with other technologies.

1 分で読めます

Questions about this topic

Quick, clear answers to what readers ask most about this topic.

Webホスティングにおけるサーバーとは何ですか?

Webホスティングにおけるサーバーとは、インターネットにつながったまま動き続け、要求に応じて訪問者にWebサイト、アプリ、メール、データを届けるコンピューターです。通常はLinuxなどのOSと、NginxやApacheなどのWebサーバーが動いています。ホスティング会社は、安定した電源と高速な回線を備えたデータセンターでサーバーを運用しています。

VPSサーバーとは何ですか?

VPS(仮想専用サーバー)とは、ほかのVPS利用者と共有する高性能な物理サーバーの上で動く、専用の仮想マシンです。各VPSは、独自のOS、独自のリソース、完全な管理者権限を持ちます。VPSなら、共用ホスティングよりはるかに自由に管理できます。

VPSとVDSの違いは何ですか?

VPSは物理サーバーのCPUコアを複数の利用者で共有し、VDS(仮想専用サーバー)は特定のコアとメモリを一人の顧客だけのために確保します。そのため、VDSは負荷がかかったときも性能が安定しています。どちらも、完全な管理者権限を持つ仮想マシンとして動きます。

専用サーバーとは何ですか?

専用サーバーとは、一台の物理マシン全体を一人の顧客に貸し出すもので、CPU、メモリ、ディスクのすべてがその顧客専用になります。大規模なWebサイト、重いデータベース、最高の性能や厳密な分離が必要な処理に向いています。その分、専用サーバーには最も高い管理スキルが必要です。

共用ホスティングからVPSに移行すべきなのはどんなときですか?

アクセスが増えてWebサイトが遅くなる、リソースの上限に達する、共用ホスティングでは使えないソフトウェアが必要になる、といった場合はVPSへの移行が理にかなっています。独自のサーバー設定が必要なサイトにもVPSが向いています。成長中のネットショップやWebアプリが、最初にこの段階に達することがよくあります。

成長中の会社にはVPSと専用サーバーのどちらが良いですか?

柔軟でアップグレードも簡単なため、ほとんどの成長中の会社にはVPSのほうが向いており、マシン一台分が必要な重く安定した処理には専用サーバーのほうが向いています。多くの企業はVPSから始め、後で専用のハードウェアに移行します。どちらを選ぶかは、アクセス数、データ量、必要な性能によって決まります。

AlmaLinuxとは何ですか?

AlmaLinuxとは、Red Hat Enterprise Linuxとバイナリ互換を持つ、無料でコミュニティが運営するLinuxディストリビューションです。CentOS Linuxの終了後、その安定した後継としてサーバーで広く使われています。AlmaLinuxは、メジャーバージョンごとに長期のセキュリティ更新を受けられます。

AlmaLinuxがサーバーで人気なのはなぜですか?

安定していて無料で使え、Red Hat Enterprise Linuxと互換性があり、何年にもわたってセキュリティ更新が提供されるため、AlmaLinuxはサーバーで人気があります。多くのホスティング用コントロールパネルがAlmaLinuxに対応しています。CentOSに慣れた管理者にとって、AlmaLinuxの管理方法はほぼ同じです。

SSHでLinuxサーバーに接続するにはどうすればよいですか?

Linuxサーバーには、ターミナルから ssh user@server-address のようなコマンドを実行し、パスワードを入力するか鍵を使ってSSHで接続します。SSHは、通信全体を暗号化します。Windowsのターミナルにも、SSHクライアントが含まれています。

パスワードの代わりにSSH鍵を使うべきなのはなぜですか?

SSH鍵は事実上推測できず、総当たりのログイン試行を防げるため、パスワードの代わりに使うべきです。秘密鍵は利用者のパソコンに残し、公開鍵だけをサーバーに置きます。鍵でのログインが確認できたら、パスワードでのログインを完全に無効にできます。

新しいLinuxサーバーを安全にするにはどうすればよいですか?

新しいLinuxサーバーは、すべての更新を適用し、sudo権限を持つ一般ユーザーを作り、SSH鍵を使い、rootとパスワードでのログインを無効にし、必要なポートだけを許可するファイアウォールを有効にすることで安全にできます。Fail2banなどのツールは、何度も失敗するログインをブロックします。定期的な更新とバックアップで、サーバーを長く安全に保てます。

Linuxサーバーのファイアウォールとは何ですか?

Linuxサーバーのファイアウォールとは、ポート、プロトコル、アドレスに応じて通信を許可またはブロックするルールの集まりです。WebやSSHなど公開を意図したもの以外のすべてのサービスを閉じたままにします。AlmaLinuxでよく使われるファイアウォールのツールはfirewalldです。

AlmaLinuxのfirewalldでポートを開くにはどうすればよいですか?

AlmaLinuxのfirewalldでポートを開くには、firewall-cmd --permanent --add-port=8080/tcp を実行し、続けて firewall-cmd --reload で反映させます。よく使うサービスは、--add-service=https のように名前で開けます。firewall-cmd --list-all を実行すると、現在のルールが表示されます。

AlmaLinuxでパッケージを更新するにはどうすればよいですか?

AlmaLinuxでは sudo dnf update コマンドでパッケージを更新し、設定されたリポジトリから最新のバージョンをダウンロードしてインストールします。カーネルの更新後には再起動が必要です。dnf-automaticパッケージを使えば、セキュリティ更新を自動で適用するよう設定できます。

サーバー管理者が知っておくべきLinuxのコマンドは何ですか?

サーバー管理者は、ls、cd、cp、mv、rm、nanoまたはvim、systemctl、journalctl、df、free、top、ss、chmod、chownなどのコマンドを知っておくべきです。これらで、ファイル、サービス、ログ、ディスク容量、メモリ、プロセス、ネットワークのポート、権限を扱えます。これらを知っていれば、日々のサーバー作業のほとんどをこなせます。

Linuxサーバーのディスク容量とメモリを確認するにはどうすればよいですか?

Linuxサーバーのディスク容量は df -h で、メモリは free -h で確認でき、どちらも読みやすい単位でサイズを表示します。du -sh コマンドを使えば、フォルダが使っている容量がわかります。top や htop を実行すると、どのプロセスがメモリとCPU時間を使っているかが表示されます。

Linuxサーバーでサービスを再起動するにはどうすればよいですか?

Linuxサーバーでサービスを再起動するには、sudo systemctl restart の後に nginx のようなサービス名を付けて実行します。systemctl status コマンドで、サービスが動いているかどうかと、最近のログが表示されます。サービスが対応していれば、restartの代わりにreloadを使うと、接続を切らずに新しい設定を反映できます。

Linuxサーバーのログファイルはどこにありますか?

Linuxサーバーのログファイルの多くは /var/log フォルダにあり、systemdのサービスはjournalに記録され、journalctlで読めます。NginxなどのWebサーバーは、/var/log の下に独自のアクセスログとエラーログを書き出します。何かが動かなくなったとき、最初にすべきことはログの確認です。

Fail2banとは何ですか?サーバーにインストールすべき理由は何ですか?

Fail2banとは、サーバーのログを監視し、ログインに何度も失敗したIPアドレスを一時的にブロックするツールです。SSHやほかのサービスへの自動化されたパスワード推測攻撃を防ぎます。Fail2banはファイアウォールと連携して動き、一度設定すればほとんど手間がかかりません。

サーバーはどのようにバックアップすべきですか?

サーバーは決まったスケジュールで自動的にバックアップし、その複製をサーバー自体とは別の場所に保管すべきです。バックアップには、ファイル、データベース、設定を含める必要があります。定期的にバックアップの復元テストを行えば、本当に使えることを確認できます。

rootユーザーとは何ですか?rootでログインすべきですか?

rootユーザーとは、サーバー全体に対して無制限の権限を持つLinuxの管理者アカウントです。一つのミスや一つの盗まれたパスワードがすべてに影響するため、rootで直接ログインすることは推奨されません。日々の作業には、sudo権限を持つ一般ユーザーのほうが安全です。

サーバーの稼働状況と性能を監視するにはどうすればよいですか?

サーバーの稼働状況と性能は、CPU、メモリ、ディスク、ネットワークの使用状況を追跡し、問題が起きたときに通知を送るツールで監視します。外部からの死活監視で、Webサイトに外からアクセスできるかを確認します。時間をかけて傾向を見れば、サーバーにいつリソースの追加が必要になるかがわかります。

サーバーの稼働率99.9パーセントとはどういう意味ですか?

サーバーの稼働率99.9パーセントとは、30日間の一か月のうち、停止が約43分以内に収まり、それ以外の時間はサーバーが利用できる見込みであることを意味します。稼働率の保証は、ホスティング契約で信頼性を測る基準です。計画メンテナンスの時間がこの数字に含まれるかどうかは、契約によって異なります。

マネージドサーバーとアンマネージドサーバーのどちらを選ぶべきですか?

社内に管理者がいない場合は、提供会社が更新、セキュリティ、監視を引き受けてくれるマネージドサーバーのほうが良い選択です。アンマネージドサーバーは、Linuxのスキルがあり、すべてを自分たちで管理したいチームに向いています。どちらを選ぶかは、使える時間と専門知識によって決まります。

HostrenaはVPS、VDS、専用サーバーを提供していますか?

LinkysoftのホスティングブランドであるHostrenaは、VPSサーバー、コアとメモリを確保したVDSサーバー、専用サーバー、AI向けのGPUサーバーを提供しています。顧客は北米、ヨーロッパ、アジア太平洋からデータセンターを選べ、99.9%の稼働率保証と、24時間365日サポートチケットに対応するエンジニアがついています。Hostrenaのエンジニアは、既存のWebサイトやサーバー全体の移行も無料で行います。