We consider solving a sparse linear system using integer (fixed-point) arithmetic. Integer arithmetic has attracted attention in scientific computing because of its high computational efficiency. Furthermore, considering the current circumstances of hardware development, integer arithmetic is expected to become increasingly important. Nevertheless, integer arithmetic has not been widely used for solving linear systems because it lacks robustness against overflow and underflow, making it hard to solve practical problems. Thus, we propose a new integer-based implementation framework for the flexible GMRES (FGMRES) method, which enables integer-based solvers to solve linear systems with the same accuracy as conventional floating-point solvers. In addition, we propose an integer-only algebraic multigrid preconditioner. Combining it with the integer-based FGMRES framework, we develop an integer-based solver. Numerical experiments on CPUs showed that the developed integer-based solver has a comparable convergence rate to floating-point solvers. We also found the test cases where the integer-based solver runs faster than the floating-point solvers.